{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
    {% for good in page.object_list %}
        <h4>{{good.name}} - {{good.des}}</h4>
    {% endfor %}
    <ul class="pagination">
        {% if page.has_previous %}
            <li>
                <a href="?index={{page.previous_page_number}}">上一页</a>
            </li>
        {% else %}
            <li class="disabled">
                <a href="#">上一页</a>
            </li>
        {% endif %}

        {% for page_number in paginator.page_range %}
            {% if page_number == page.number %}
                <li class="active">
                    <a href="?index={{page_number}}">{{page_number}}</a>
                </li>
            {% else %}
                <li>
                    <a href="?index={{page_number}}">{{page_number}}</a>
                </li>
            {% endif %}
        {% endfor %}

        {% if page.has_next %}
            <li>
                <a href="?index={{page.next_page_number}}">下一页</a>
            </li>
        {% else %}
        <li class="disabled">
            <a href="#">下一页</a>
        </li>
        {% endif %}
    </ul>

</body>
</html>